612c28
@@ -686,6 +686,13 @@
public class HRegionServer implements HRegionInterface, HBaseRPCErrorHandler,
           getMostLoadedRegions());
         break;
       } catch (IOException ioe) {
+        if (ioe instanceof RemoteException) {
+          ioe = ((RemoteException)ioe).unwrapRemoteException();
+        }
+        if (ioe instanceof YouAreDeadException) {
+          // This will be caught and handled as a fatal error in run()
+          throw ioe;
+        }
         // Couldn't connect to the master, get location from zk and reconnect
         // Method blocks until new master is found or we are stopped
         getMaster();
